﻿using System;
using System.Collections.Generic;
using YJKRoomInspection.Model;
using YJKRoomInspection.Utiltiy;
using YJKInspectModelFunc.ModelLayer;

namespace YJKRoomInspection.SpecialUse
{
	public class YJKRoomInspection_CmdFrontRoomDoorsCheck : IYJKRoomInspection<ICloseCurveAnalays>, IPackerCheck<ICloseCurveAnalays>, IBase<ICloseCurveAnalays>
	{
		List<ICloseCurveAnalays> IPackerCheck<ICloseCurveAnalays>.CheckPackers(List<ICloseCurveAnalays> input, params object[] otherValues)
		{
			List<ICloseCurveAnalays> list = new List<ICloseCurveAnalays>();
			list.AddRange(input);
			foreach (ICloseCurveAnalays closeCurveAnalays in list)
			{
				this.lstDoorPacker.AddRange(closeCurveAnalays.GetAllDoors());
				foreach (BaseDoorPacker baseDoorPacker in this.lstDoorPacker)
				{
					FrontRoomDoorPacker frontRoomDoorPacker = baseDoorPacker as FrontRoomDoorPacker;
					bool isRight = Utility.JudgeDoorIsRight(frontRoomDoorPacker.ThisDoor);
					frontRoomDoorPacker.IsRight = isRight;
				}
				this.lstDoorPacker.Clear();
			}
			return list;
		}

		private List<FrontRoomDoorPacker> lstAllRoomDoorPackers = new List<FrontRoomDoorPacker>();

		private List<FrontRoomDoorPacker> lstOneRoomDoorPackers = new List<FrontRoomDoorPacker>();

		private List<BaseDoorPacker> lstDoorPacker = new List<BaseDoorPacker>();
	}
}
